import Home from '@/components/home/pages/home.index.vue'
var r = require.context('../components',true,/\.route\.js/);
var arr = [];
var arrParent = [
  {
    path: '*',
    hidden: true,
    redirect: { path: '/error' }
  }
]
r.keys().forEach((item)=>{
  arr = arr.concat(r(item).default);
})
var arrHome = [
  {
    path: '/',
    name: 'home',
    component: Home,
    meta:{
      title:'erp查询' // 标题设置在这里
    },
    children: [...arr]
  }
]
arrParent = arrParent.concat(arrHome);
var routes =  arrParent;//[...arr];
export default routes
